package test07;

import java.util.*;
import java.time.LocalDateTime;

/**
 * 处理记录类
 */
public class ProcessingRecord {
    private String handlerName;
    private LocalDateTime timestamp;
    private String result;
    private long processingTime; // 毫秒
    private double confidence;

    public ProcessingRecord(String handlerName, String result, long processingTime, double confidence) {
        this.handlerName = handlerName;
        this.timestamp = LocalDateTime.now();
        this.result = result;
        this.processingTime = processingTime;
        this.confidence = confidence;
    }

    @Override
    public String toString() {
        return String.format("[%s] %s - %s (耗时: %dms, 置信度: %.2f)",
                timestamp, handlerName, result, processingTime, confidence);
    }

    // Getters
    public String getHandlerName() { return handlerName; }
    public LocalDateTime getTimestamp() { return timestamp; }
    public String getResult() { return result; }
    public long getProcessingTime() { return processingTime; }
    public double getConfidence() { return confidence; }
}

